Liew Tze Hao Timothy
09/23/2026, 7:41 AMkapa.ai
09/23/2026, 7:41 AM$sample aggregation pipeline to randomly pick documents (by default 10,000, which you increased to 20,000) to infer top-level fields [Update Capture Mode: Lookup vs Post Image; Schema discovery performance impact].
Airbyte documentation explicitly notes that because MongoDB collections are schemaless, no sample size can guarantee a complete or stable schema [Schema discovery performance impact]. If the new fields only exist in a small subset of recently added documents in a very large collection, the random $sample stage may completely miss them during the sampling process. You can increase the Discovery Sample Size up to 100,000 documents [Update Capture Mode: Lookup vs Post Image], but this will increase discovery time and database load.
2. Similar Issues and Past Reports • Discovery Timeouts/Silent Failures: Multiple users have reported issues where schema discovery either takes too long and times out (e.g., exiting with an error or hanging due to heavy $sample and aggregation pipelines), or appears to fail silently [Github Issue (closed): Mongodb connector fails to refresh schema; Forum Post: Mongo Connector Schema Discovery Fails].
• Adding Fields Manually: Other users experiencing difficulty getting the discovery process to detect new fields attempted workarounds like manually patching the catalog spec via the Airbyte API [Forum Post: Manually Add Collections to Existing Mongo Connector].
Recommended Workaround: Disable Schema Enforcement If increasing the sample size does not capture your new fields, the recommended solution is to disable Schema Enforcement (set Schema Enforced to false in the source configuration) [Schema discovery performance impact; Replication Methods].
When schema enforcement is disabled:
• Airbyte does not run sampling to discover fields [Update Capture Mode: Lookup vs Post Image; Schema discovery performance impact].
• Every document is synced with an _id field and a data JSON blob containing the entire set of document fields [Replication Methods]:{
"_id": "document id",
"data": { "entire set of fields found in document" }
}
• No fields are omitted regardless of when they were added or how varied the structure is across documents [Replication Methods]. You can then extract your new fields downstream in your destination. 👍 0 button 👎 0 button ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.Liew Tze Hao Timothy
09/24/2026, 12:38 AM